<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateConfSitesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('conf_sites', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->string('site_name')->nullable();
			$table->decimal('money', 15, 5)->unsigned()->default(0.00000)->comment('人民币');
			$table->string('username', 20)->comment('用户名');
			$table->integer('user_id')->comment('网站后台账户id');
			$table->integer('agent_id')->comment('网站代理id');
			$table->boolean('is_external')->default(0)->comment('0=同源站，1=外部站');
			$table->boolean('status')->default(1)->comment('状态1=开启，0=关闭');
			$table->string('token')->nullable()->comment('加密串');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('conf_sites');
	}

}
